﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HotelBookingSystem
{
    public class Hotel : Bookable
    {
        public string City { get; set;}
        public string HotelName { get; set; }

        public int HotelId
        {
            get { return unitid; }
        }

        public int NumberRooms
        {
            get { return capacity; }
            set { capacity = value; }
        }

        public decimal Rate
        {
            get { return cost; }
            set { cost = value; }
        }

        public Hotel(string city, string hotelName, int number, decimal cost)
            : base(number, cost)
        {
            this.City = city;
            this.HotelName = hotelName;
        }

        public override bool Equals(object obj)
		{
			Hotel hotel = (Hotel) obj;
			if (hotel.City == City && hotel.HotelName == HotelName)
				return true;
			else
				return false;
		}
		public override int GetHashCode()
		{
			int hashCode = City.GetHashCode() + HotelName.GetHashCode();
			return(hashCode);
		}
	}
}
